using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using CRM.Models.Mapping;

namespace CRM.Models
{
    public class XCBCrmContext : DbContext
    {
        static XCBCrmContext()
        {
            Database.SetInitializer<XCBCrmContext>(null);
        }

		public XCBCrmContext()
			: base("Name=XCBCrmContext")
		{
		}

        public DbSet<role> roles { get; set; }
        public DbSet<user> users { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new roleMap());
            modelBuilder.Configurations.Add(new userMap());
        }
    }
}
